<?php
/**
 * User: xialei
 * Date: 2016/7/2 0002
 * Time: 15:04
 */
\yii\bootstrap\BootstrapAsset::register($this);
?>
<style>
    body {
        font-family: "Consolas", "Microsoft Yahei", Arial, monospace;
        font-size: 14px;
        margin: 20px;
    }

    label {
        font-weight: normal;
    }
</style>
<div class="container">
    <div class="jumbotron">
        <h1 class="text-center">请登录</h1>
    </div>
    <form action="" method="post" class="form-inline text-center">
        <label for="username">账号</label>
        <input type="text" class="form-control" id="username" required name="username">
        <label for="password">密码</label>
        <input type="password" class="form-control" id="password" required name="password">
        <label for="remember"><input type="checkbox" name="remember" id="remember"> 保持登录</label>
        <button class="btn btn-success">登录</button>
        <button class="btn btn-default" type="reset">重置</button>
    </form>
</div>

<?php
$error = Yii::$app->session->getFlash('error');
if (!empty($error)):
    ?>
    <script>
        alert('<?=$error?>');
    </script>
<?php endif ?>
